From 98581f8285af2e4a52a52b5fded187da3bb9c922 Mon Sep 17 00:00:00 2001 From: Jeroen van der Heijden Date: Thu, 14 Mar 2019 10:00:23 +0100 Subject: [PATCH] Added makefile.targets for `make install` and `make uninstall`, upd readme.md --- Debug/makefile | 2 ++ README.md | 10 ++++++++++ Release/makefile | 2 ++ makefile.targets | 11 +++++++++++ 4 files changed, 25 insertions(+) create mode 100644 makefile.targets diff --git a/Debug/makefile b/Debug/makefile index 49e7070f..7f840430 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -52,9 +52,11 @@ OS := $(shell uname) ifeq ($(OS),Darwin) CRYPT := UUID := +INSTALL_PATH := /usr/local else CRYPT := -lcrypt UUID := -luuid +INSTALL_PATH := /usr endif # Add inputs and outputs from these tool invocations to the build variables diff --git a/README.md b/README.md index 1f02b937..54450e7e 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,11 @@ make test make ``` +Install +``` +sudo make install +``` + #### OSX >Make sure [libcleri](https://github.com/transceptor-technology/libcleri) is installed! @@ -77,6 +82,11 @@ make test make ``` +Install +``` +sudo make install +``` + #### Configuration SiriDB requires a configuration file to run. By default SiriDB will search for the configuration file in `/etc/siridb/siridb.conf` but alternatively you can specify a custom path by using the `-c/--config` argument. diff --git a/Release/makefile b/Release/makefile index fc01f531..02df6688 100644 --- a/Release/makefile +++ b/Release/makefile @@ -52,9 +52,11 @@ OS := $(shell uname) ifeq ($(OS),Darwin) CRYPT := UUID := +INSTALL_PATH := /usr/local else CRYPT := -lcrypt UUID := -luuid +INSTALL_PATH := /usr endif # Add inputs and outputs from these tool invocations to the build variables diff --git a/makefile.targets b/makefile.targets new file mode 100644 index 00000000..b357e0bb --- /dev/null +++ b/makefile.targets @@ -0,0 +1,11 @@ +.PHONY: install +install: + @mkdir -p /etc/siridb/ + @mkdir -p /var/lib/siridb/ + @cp -n ../siridb.conf /etc/siridb/siridb.conf + @cp siridb-server $(INSTALL_PATH)/bin/siridb-server + + +.PHONY: uninstall +uninstall: + @rm -f $(INSTALL_PATH)/bin/siridb-server -- 2.30.2